<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改联系方式')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-information-edit" th:object="${contactInformation}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">机构地址：</label>
                <div class="col-sm-8">
                    <input name="address" th:field="*{address}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务电话：</label>
                <div class="col-sm-8">
                    <input name="servicePhone" th:field="*{servicePhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">监督电话：</label>
                <div class="col-sm-8">
                    <input name="supervisePhone" th:field="*{supervisePhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">监督部门：</label>
                <div class="col-sm-8">
                    <input name="superviseDept" th:field="*{superviseDept}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">监督部门链接：</label>
                <div class="col-sm-8">
                    <input name="superviseDeptLink" th:field="*{superviseDeptLink}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">邮箱：</label>
                <div class="col-sm-8">
                    <input name="email" th:field="*{email}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">服务时间：</label>
                <div class="col-sm-8">
                    <input name="serviceDate" th:field="*{serviceDate}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版权所有：</label>
                <div class="col-sm-8">
                    <input name="copyright" th:field="*{copyright}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版权所有链接：</label>
                <div class="col-sm-8">
                    <input name="copyrightLink" th:field="*{copyrightLink}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商务委名称：</label>
                <div class="col-sm-8">
                    <input name="businessCommittee" th:field="*{businessCommittee}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商务委链接：</label>
                <div class="col-sm-8">
                    <input name="businessCommitteeLink" th:field="*{businessCommitteeLink}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版权图片：</label>
                <div class="col-sm-8">
                    <input id="filePath" name="filePath" class="form-control" type="file">
                    <input id="copyrightPictureUrl" name="copyrightPictureUrl" th:field="*{copyrightPictureUrl}"  type="text" hidden>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版权图片链接：</label>
                <div class="col-sm-8">
                    <input name="copyrightPictureLink" th:field="*{copyrightPictureLink}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "front/contactInformation";
        $("#form-information-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                if ($('#filePath')[0].files[0] != null) {
                    let result2 = uploadMoreFile(false, "copyrightPictureUrl", "filePath");
                    if (result2 != web_status.SUCCESS) {
                        return;
                    }
                }
                $.operate.save(prefix + "/edit", $('#form-information-edit').serialize());
            }
        }
    </script>
</body>
</html>